<h1><%= "#{t(:listing)} #{t(:inventories)}" %></h1>

<table>
  <thead>
    <tr>
      <th><%= t :name %></th>
      <th><%= t :description %></th>
      <th><%= t :created_at %></th>
      <th><%= t :updated_at %></th>
      <th><%= t :created_by %></th>
      <th><%= t :updated_by %></th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @inventories.each do |inventory| %>
      <tr>
        <td><%= inventory.name %></td>
        <td><%= inventory.description %></td>
        <td><%= inventory.created_at %></td>
        <td><%= inventory.updated_at %></td>
        <td><%= inventory.created_by %></td>
        <td><%= inventory.updated_by %></td>
        <td><%= link_to "#{t(:show)}", inventory %></td>
        <td><%= link_to "#{t(:edit)}", edit_inventory_path(inventory) %></td>
        <td><%= link_to "#{t(:destroy)}", inventory, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to "#{t(:new_inventory)}", new_inventory_path %>
